<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/WEB-INF/templates/template.xhtml">
	<ui:define name="content">
		<h:form id="form">
			<p:panel header="Cadastro de Usuario">
				<div class="row">
					<div class="col-lg-6">
						<h:outputLabel value="Login" />
						<h:inputText styleClass="form-control"
							value="#{usuarioBean.usuario.login}" />
					</div>
					<div class="col-lg-6">
						<h:outputLabel value="Senha" />
						<h:inputSecret styleClass="form-control"
							value="#{usuarioBean.usuario.senha}" />
					</div>
				</div>
				<div class="row">
					<div class="col-lg-6">
						<h:outputLabel value="C.P.F." />
						<h:inputText styleClass="form-control"
							value="#{usuarioBean.usuario.pessoa.cpfPessoa}" />
					</div>
					<div class="col-lg-6">
						<h:outputLabel value="Nome" />
						<h:inputText styleClass="form-control"
							value="#{usuarioBean.usuario.pessoa.nomePessoa}" />
					</div>
				</div>
			</p:panel>
			<p:commandButton value="Criar"
				action="#{usuarioBean.salvarUsuario()}" ajax="false" />
		</h:form>
	</ui:define>
</ui:composition>
</html>